package cn.ai.shoes.client.entity;

import cn.ai.shoes.client.utils.LoadBalanceStrategy;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Component;

@Component
@Getter
@Setter
public class CurrentServerEntity {
    /**
     * 当前服务器地址
     */
    private String url;
    @Resource
    private LoadBalanceStrategy loadBalanceStrategy;
    @PostConstruct
    public void init() {
        this.url = loadBalanceStrategy.switchServer();
    }
}
